package com.pikaqiu.warehouse.domain.dto;

import com.pikaqiu.warehouse.domain.entity.Materials;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: Administrator
 * @Date: 2024/8/15
 */
@Data
public class MaterialsDto {

    private Integer id;

    private String code;

    private String name;

    private String description;

    private Integer category;

    private String unit;

    private BigDecimal price;

    private BigDecimal stock;

    public MaterialsDto(Materials materials) {
        this.id = materials.getId();
        this.code = materials.getCode();
        this.name = materials.getName();
        this.description = materials.getDescription();
        this.category = materials.getCategory();
        this.unit = materials.getUnit();
        this.price = materials.getPrice();
        this.stock = materials.getStock();
    }
}
